<% layout('/layouts/default.html', {title: '任务接收', libs: ['dataGrid']}){ %>
<div class="main-content">
    <div class="box box-main">

        <div class="box-body">
            <#form:form id="searchForm" model="${gatewayProgress}" action="${ctx}/home/supIndex/queryGatewayProgressPage?remarks4=${gatewayProgress}" method="post" class="form-inline"
            data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
            <div style="float: right">
                <div class="form-group">
                    <label class="control-label">${text('督办字号')}：</label>
                    <div class="control-inline width-160">
                        <#form:input path="messageNumber" maxlength="50" class="form-control width-160" placeholder="请输入督办字号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="control-inline width-160">
                        <#form:input path="taskTitle" maxlength="200" class="form-control width-160" placeholder="请输入任务标题或内容"/>
                    </div>
                </div>
                <div class="form-group" >
                    <button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
                    <button onclick="cz()" class="btn btn-default btn-sm">${text('重置')}</button>
                </div>
            </div>
        </#form:form>
    </div>
        <table id="dataGrid"></table>
        <div id="dataGridPage"></div>
    </div>
</div>
</div>
<% } %>
<script>
    // 初始化DataGrid对象
    $('#dataGrid').dataGrid({
        searchForm: $("#searchForm"),
        sortableColumn: false, // 列表不允许排序
        // showCheckbox: true,
        columnModel: [
            {header: '${text("主键")}', name: 'taskId', index: 'a.taskId', width: 150, align: "left", hidden: true},
            {header:'${text("action主键")}', name:'id', width:150, align:"left", hidden:true},
            {header: '${text("任务标题")}', name: 'messageNumber', index: 'a.message_number', width: 150, align: "left"},
            {header: '${text("任务标题")}', name: 'taskTitle', index: 'a.task_title', width: 150, align: "left"},
            {header: '${text("任务类型")}', name: 'taskTypeName', index: 'a.task_type_code', width: 150, align: "left"},
            {header:'${text("任务内容")}', name:'taskContent', index:'a.task_content', width:150, align:"left", formatter: function(val, obj, row, act){
                    return '<a href="${ctx}/taskdeploy/dcSupTaskInfo/detailForm?id='+row.taskId+'" class="btnList" data-title="${text("督办任务信息")}">'+(val||'暂无内容')+'</a>';
                }},
            {header: '${text("牵头责任单位")}', name: 'leaderOrgName', index: 'a.task_content', width: 150, align: "left"},
            {header: '${text("反馈时间")}', name: 'feedbackTime', index: 'a.feedback_time', width: 150, align: "left"},
            {header: '${text("反馈开始时间")}', name: 'feedbackStartTime', index: 'a.feedback_start_time', width: 150, align: "left"},
            {header: '${text("反馈结束时间")}', name: 'feedbackEndTime', index: 'a.feedback_end_time', width: 150, align: "left"},
    ],
    // 加载成功后执行事件
    ajaxSuccess: function(data){

    }
    });
    function cz(){
        searchForm.reset();
        $('#dataGrid').dataGrid('reloadGrid');
    }
</script>